﻿<%@ Page language="c#" Codebehind="Index.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.SM.Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>消息主页</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />
<style type="text/css">
table {
	width:100%;
	border:none;
}
table th {
	background:#ccccff;
}
table th, table td {
	padding:3px;
}
table td span a, table td span a:visited {
	color:#fff;
}
.active1 {
	background:#1a499d;
}
.active2 {
	background:#337fb2;
	color:#fff;
	font-weight:bold;
}
.tabnavhead {
	text-align:right;
	position:relative;
}
.tnc {
	float:left;
	width:90px;
	height:30px;
	margin:0 0 0 5px;
	position:relative;
	bottom:0px;
}
.tnc a {
	width:90px;
	height:26px;
	display:block;
	padding:4px 0 0;
	text-align:center;
	line-height:26px;
	color:#fff;
}
.tnc a:visited {
	color:#fff;
}
.tnc a:hover {
	color:#ff0;
}
.path .right {
	padding:6px 0 0;
}
.redButtonCss {
    font-family: "Tahoma", "宋体";
    font-size: 9pt; color: #0066cc;
    border: 1px #93bee2 solid;
    background-image:url(/Images/redbuttonbg.gif);
    background-color: #fff;
	cursor:pointer;
    font-style: normal ;
}
</style>

		<script language="javascript">
			function selectAll(){
			var len=document.Index.elements.length;
			var i;
		    for (i=0;i<len;i++){
		    
			if (document.Index.elements[i].type=="checkbox"){
		        document.Index.elements[i].checked=true;								
						 }
					}
					
				}

		function unSelectAll(){
	          var len=document.Index.elements.length;
	          var i;
	          for (i=0;i<len;i++){
	               if (document.Index.elements[i].type=="checkbox"){
	                  document.Index.elements[i].checked=false; 
	               }   
	              
	        	 } 
	        	 }
	     	function SendMsg(username,realname)
		{
			window.opener.parent.parent.MainFrame.location='../SM/MsgSend.aspx?SendTo='+username+'&SendToRealName='+realname;
			window.close();
		}
		</script>
	</head>
<body>
<form id="Index" method="post" runat="server">
<div class="m">
<p class="path"><a href="/SubModule/UnitiveDocument/">我的桌面</a> >> 短讯管理</p>
<div class="con">

<div class="tabnav">
        <p class="tabnavhead"> <span id="bar1" class="<% Response.Write(Session["MsgDispType"].ToString()=="1"?"active2":"active1"); %> tnc"> <a href="Index.aspx?DispType=1">我的消息</a> </span> <span id="bar2"class="<% Response.Write(Session["MsgDispType"].ToString()=="2"?"active2":"active1"); %> tnc"> <a href="Index.aspx?DispType=2">已发送消息</a> </span> <span class="active1 tnc"> <a href="MsgSend.aspx">写新消息</a> </span> </p>
      </div>
<asp:datagrid id="dgMsgList" runat="server" PageSize="15" DataKeyField="ID" OnPageIndexChanged="DataGrid_PageChanged"
		PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages" AllowPaging="True" AutoGenerateColumns="False" BorderColor="#337FB2" BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="3" AllowSorting="True" Width="100%">
		<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
		<AlternatingItemStyle BackColor="#E8F4FF"></AlternatingItemStyle>
		<ItemStyle   HorizontalAlign="Center" ForeColor="Black" VerticalAlign="Middle"
			BackColor="White"></ItemStyle>
		<HeaderStyle   HorizontalAlign="Center" Height="10px" ForeColor="White" VerticalAlign="Top"
			BackColor="#337FB2"></HeaderStyle>
		<FooterStyle   HorizontalAlign="Center" Height="10px" ForeColor="Black" VerticalAlign="Bottom"
			BackColor="#93BEE2"></FooterStyle>
		<Columns>
			<asp:TemplateColumn HeaderText="选择">
				<HeaderStyle HorizontalAlign="Center" Width="40px"></HeaderStyle>
				<ItemStyle   HorizontalAlign="Center" Height="20px" Width="60px"></ItemStyle>
				<ItemTemplate>
					<asp:CheckBox id="grpMsgID" Checked="False" Runat="server"></asp:CheckBox>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn HeaderText="发送者">
				<HeaderStyle Width="15%"></HeaderStyle>
				<ItemStyle HorizontalAlign="Left"></ItemStyle>
				<ItemTemplate>
					<a href='../SM/MsgSend.aspx?SendTo=<%# DataBinder.Eval(Container, "DataItem.Sender") %>&SendToRealName=<%# DataBinder.Eval(Container,"DataItem.SenderRealName") %>&Type=<%# DataBinder.Eval(Container,"DataItem.type") %>'>
						<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.SenderRealName") %>'>
						</asp:Label></a>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn HeaderText="接收者">
				<HeaderStyle Width="15%"></HeaderStyle>
				<ItemStyle HorizontalAlign="Left"></ItemStyle>
				<ItemTemplate>
					<a href='../SM/MsgSend.aspx?SendTo=<%# DataBinder.Eval(Container, "DataItem.Receiver") %>&SendToRealName=<%# DataBinder.Eval(Container, "DataItem.ReceiverRealName") %>&Type=<%# DataBinder.Eval(Container,"DataItem.type") %>'>
						<asp:Label ID="Label2" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ReceiverRealName") %>'>
						</asp:Label></a>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:BoundColumn DataField="Content" HeaderText="内容">
				<HeaderStyle Width="40%"></HeaderStyle>
				<ItemStyle HorizontalAlign="Left"></ItemStyle>
			</asp:BoundColumn>
			<asp:TemplateColumn HeaderText="短讯类型">
				<HeaderStyle Width="10%"></HeaderStyle>
				<ItemTemplate>
					<asp:Label ID="Label3" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.typeDetail") %>'>
					</asp:Label>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn HeaderText="是否已读">
				<HeaderStyle Width="10%"></HeaderStyle>
				<ItemTemplate>
					<%# (string)DataBinder.Eval(Container.DataItem,"IsRead")=="False"?"<img src='../../Images/mailclose.gif'>":"<img src='../../Images/mailopen.gif'>" %>
					</asp:Label>
				</ItemTemplate>
			</asp:TemplateColumn>
			<asp:BoundColumn DataField="Sendtime" HeaderText="发送时间">
				<HeaderStyle Width="20%"></HeaderStyle>
				<ItemStyle HorizontalAlign="Left"></ItemStyle>
			</asp:BoundColumn>
		</Columns>
		<PagerStyle HorizontalAlign="Right" Mode="NumericPages"></PagerStyle>
	</asp:datagrid>
	<p>
	    <input class="redButtonCss" onclick="selectAll()" type="button" value="全 选"> 
	    <input class="redButtonCss" onclick="unSelectAll()" type="button" value="取 消"> 
	    <asp:button id="btnRead" runat="server" CssClass="redButtonCss" Text="已阅"></asp:button>
	    <asp:button id="btnDelete" runat="server" CssClass="redButtonCss" Text="删除"></asp:button>
	   </p>
  </div>
</div>
		</form>
</body>
</html>
